home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / misc~1 / 337 / wuzzlers.lst < prev    next >
File List  |  1989-10-12  |  60KB  |  2,395 lines

  1. '
  2. ' *********************************************************************
  3. '                              W U Z Z L E R S
  4. '                       A Word and Picture Puzzle Game
  5. '                    yet another kidprg in GFA Basic from
  6. '                               D.A. Brumleve
  7. '                         Copyright 1989 by ST-LOG
  8. ' **********************************************************************
  9. '                               Version 4.1
  10. '                            February 9, 1989
  11. ' **********************************************************************
  12. '                                REFERENCE
  13. ' **********************************************************************
  14. ' VARIABLES
  15. ' A%=dummy holding keyboard input
  16. ' Aa%=current x position of the mouse
  17. ' Aaa%
  18. ' Active_player%=0 (player one) or 1 (player two)
  19. ' Actual_count%=number of correct guesses toward completing the word
  20. ' Alpha$
  21. ' Alphabet_grid$=snapshot of the alphabet grid
  22. ' Already_chosen%()=array keeping track of letters already selected
  23. ' Alrt$
  24. ' Back%=value (0 or 1) indicates user's intention to exit a subprogram and return to the
  25. '            Shell screen
  26. ' Bb%=current y position of the mouse
  27. ' Bbb%
  28. ' Blank_it%=value (0 or 1) indicates whether or not user wants to erase a picture
  29. ' Bpbaddr%
  30. ' Buf$
  31. ' Button%
  32. ' C$
  33. ' C%
  34. ' Cbutton%=current status of the mouse buttons
  35. ' Cc%=currently-selected drawing color
  36. ' Ccc%
  37. ' Clear_draw_options$=a snapshot of unselected drawing options for use in
  38. '           clearing selections
  39. ' Col%
  40. ' Color_choice$=a snapshot of the three color choice rows (with none
  41. '             selected) for use in erasing previous color selections
  42. ' Creation_screen$=snapshot of the Creation screen
  43. ' Current_screen$=a snapshot of the entire screen as it was before the
  44. '            line was begun.  The snapshot is put upon the screen to
  45. '            (in effect) erase a rubber shape/line or to restore the previous
  46. '            picture or screen.
  47. ' Cx%
  48. ' Dev%=drive from which the program was loaded
  49. ' Df%
  50. ' Dt_color%(pixel_row%,pixel_column%)=an array storing the color number of
  51. '               each pixel in the defined block in magnify mode
  52. ' Drw_type%=the type of drawing to be done:
  53. '             0=Fill, 1=Freehand Drawing 2=Line 3=Large Dot Freehand Drawing
  54. '             4=Frame 5=Circle
  55. ' Dummy%
  56. ' Dur%
  57. ' Dur1%
  58. ' Dur2%
  59. ' Dur3%
  60. ' File$=puzzle file, "wuzzlers.dat" (must be in same directory as program)
  61. ' File_number$
  62. ' File_number%
  63. ' Flled_it%
  64. ' Fll_style%
  65. ' Fll_type%
  66. ' First_dot%=indicates whether or not the first dot has been drawn (in draw mode)
  67. ' Got_one%
  68. ' Guess$=the user's guess for each letter
  69. ' Gx%=x-position of underlining
  70. ' Gx%()=x-position of text
  71. ' Gy%
  72. ' Here_goes%
  73. ' Hub_x%=x position of the hub of the circle
  74. ' Hub_y%=y position of the hub of the circle
  75. ' I$
  76. ' I%
  77. ' J%
  78. ' Jj%
  79. ' Just_loaded%=indicates whether or not the last action was to load a record.
  80. ' L$
  81. ' Last_aa%=previous x position of the mouse
  82. ' Last_bb%=previous y position of the mouse
  83. ' Length%
  84. ' Llx%=x position of upper left-hand corner of box around defined block
  85. ' Lly%=y position of upper left-hand corner of box around defined block
  86. ' Lsuccess%=indicates whether or not loading has been successful
  87. ' Ltter_count%=keeps track of the number of letters in the new word
  88. ' Lttr$(Ltter_count%)=string array representing each letter typed
  89. ' Lx%
  90. ' Ly%
  91. ' Magni_block$=a snapshot of the defined block in the draw box
  92. ' Magnified_it%=an indicator of whether or not any changes have been made
  93. '               to the defined block while in magnify mode
  94. ' Magnify_grid$
  95. ' Main_screen$
  96. ' Mx%
  97. ' My%
  98. ' N%
  99. ' Nw_word$=the new word for which the picture will serve as a hint
  100. ' No_more%=value (0 or 1) indicates whether there are unused puzzles on the
  101. '                "wuzzlers.dat" on disk
  102. ' Nt%
  103. ' Nt1%
  104. ' Nt2%
  105. ' Nt3%
  106. ' Oct%
  107. ' Oct1%
  108. ' Oct2%
  109. ' Oct3%
  110. ' P$
  111. ' Palette%()=array storing original color palette
  112. ' Play_game%=value (0 or 1) indicates whether the user is playing the game
  113. '                or not
  114. ' Player_name$()=array storing input names of players
  115. ' Plx%
  116. ' Ply%
  117. ' Point_x1%=x position of the beginning point of shape/line to be drawn
  118. ' Point_x2%=x position of the end point of the shape/line drawn
  119. ' Point_y1%=y position of the beginning point of shape/line to be drawn
  120. ' Point_y2%=y position of the end point of the shape/line drawn
  121. ' Prx%
  122. ' Pry%
  123. ' Puz$
  124. ' Puzzle$()
  125. ' Puzzle%(Active_player%)=number of puzzles successfully solved
  126. ' Puzzle_piece%
  127. ' Puzzle_total$()
  128. ' Qy%
  129. ' R%
  130. ' Radius%=the radius of the circle
  131. ' Real_dir$=the original directory (must be root)
  132. ' Real_word$=the actual word the user is supposed to guess
  133. ' Recno%=record number of puzzle to be loaded/saved
  134. ' Record_already_chosen%()=array storing record numbers of puzzles which
  135. '                have been displayed during a game
  136. ' Result%=result of checks for disk read/write errors
  137. ' Rez%=current screen resolution
  138. ' Rim_x%=x position of one point on the rim of the circle
  139. ' Rim_y%=y position of that same point on the rim of the circle
  140. ' Rr%
  141. ' Rubber_box$=a snapshot of the draw box prior to alteration of defined block
  142. ' Rx%
  143. ' Ry%
  144. ' Score$
  145. ' Score%(Active_player%)=score for this puzzle, figured as 9 minus the number of
  146. '            incorrect guesses
  147. ' Shell_screen$=snapshot of the Shell screen
  148. ' Sizepuz%()
  149. ' Sizetotal%
  150. ' Strposit%
  151. ' Stx%
  152. ' Sty%
  153. ' Target_hit%=value (0 or 1) indicates whether the mouse in magnify mode
  154. '            has been clicked in a permitted area.
  155. ' Tempnw_word$
  156. ' Temppuz$
  157. ' Total_score$()
  158. ' Total_score%(Active_player%)=the cumulative score of one player              !
  159. ' Two_player%=value (0 or 1) indicates a one- or two-player game
  160. ' Tx%
  161. ' Word_length%=the number of letters in the actual word
  162. ' Wrong_guess_count%=number of incorrect guesses
  163. ' Xx%
  164. ' Yes%
  165. ' Your_turn$
  166. ' Yy%
  167. '
  168. ' *******************************************************************
  169. '                               PROGRAM
  170. ' *******************************************************************
  171. '
  172. ' **************************** INITIALIZE ***************************
  173. Dim Palette%(15),Player_name$(1),Score%(1),Puzzle%(1),Puzzle_total$(1)
  174. Dim Total_score$(1),Total_score%(1),Dt_color%(17,8),Gx%(12),Puzzle$(9)
  175. Dim Sizepuz%(9),Lttr$(12),Already_chosen%(26),Record_already_chosen%(200)
  176. Dev%=Gemdos(&H19)
  177. Real_dir$=Dir$(Dev%+1)
  178. File$="\wuzzlers.dat"
  179. If Dir$(Dev%+1)<>""
  180.   Alert 1," |You must use this program|from the ROOT directory of|your disk!",3,"Oops!",Dummy%
  181.   End
  182. Endif
  183. Cls
  184. @Check_rez
  185. @Save_palette
  186. Hidem
  187. Graphmode 2
  188. @Black_screen
  189. @Shell_screen
  190. Sget Shell_screen$
  191. Cls
  192. @All_screens
  193. @Main_screen
  194. Sget Main_screen$
  195. Cls
  196. @All_screens
  197. @Creation_screen
  198. Sget Creation_screen$
  199. Get 171,0,316,62,Color_choice$
  200. @Fill_puzzle_array
  201. Cls
  202. @Set_color
  203. Sput Shell_screen$
  204. Play_game%=0
  205. Lsuccess%=0
  206. Here_goes%=0
  207. Showm
  208. '
  209. ' *************************** SHELL SCREEN LOOP ****************************
  210. Do
  211.   @Let_go
  212.   Repeat
  213.     Mouse Xx%,Yy%,Button%
  214.   Until Button%>0
  215.   If Xx%>0 And Xx%<142 And Yy%>85 And Yy%<137
  216.     Play_game%=1
  217.     Back%=0
  218.     @Clear_records
  219.     Deffill 3,2,8
  220.     Fill 1,86
  221.     @Select_sound
  222.     Pause 15
  223.     @Black_screen
  224.     Sput Main_screen$
  225.     @How_many
  226.     Total_score%(1)=0
  227.     Total_score%(0)=0
  228.     Puzzle%(1)=0
  229.     Puzzle%(0)=0
  230.     @Report_score
  231.     If Two_player%=1
  232.       Active_player%=Random(2)
  233.     Endif
  234.     @Play_game
  235.     Play_game%=0
  236.   Endif
  237.   If Xx%>177 And Xx%<319 And Yy%>85 And Yy%<137
  238.     Back%=0
  239.     File_number%=1
  240.     Deffill 12,2,8
  241.     Fill 178,86
  242.     @Select_sound
  243.     Pause 15
  244.     @Creation
  245.   Endif
  246.   If Xx%>83 And Xx%<225 And Yy%>147 And Yy%<199
  247.     @Exit_alert2
  248.     If Yes%=1
  249.       Pause 15
  250.       @Finale_sound
  251.       Cls
  252.       @Restore_palette
  253.       End
  254.     Else
  255.       Sput Shell_screen$
  256.     Endif
  257.   Endif
  258. Loop
  259. '
  260. ' ************************* MAIN PLAY LOOP ********************************
  261. Procedure Play_game
  262.   Do
  263.     If Two_player%=1
  264.       If Player_name$(Active_player%)<>""
  265.         Your_turn$=Player_name$(Active_player%)+", press PLAY for your puzzle!"
  266.       Else
  267.         Your_turn$="Player "+Str$(Active_player%+1)+", press PLAY for your puzzle!"
  268.       Endif
  269.     Else
  270.       Your_turn$="    Press PLAY to load a puzzle!"
  271.     Endif
  272.     Deftext 3,0,0,6
  273.     Text 10,35,Your_turn$
  274.     @Let_go
  275.     Repeat
  276.       Mouse Mx%,My%,Button%
  277.     Until Button%>0
  278.     If My%>0 And My%<18
  279.       If Mx%>0 And Mx%<52
  280.         @Exit_alert
  281.         If Yes%=1
  282.           Back%=1
  283.         Else
  284.           Sput Current_screen$
  285.         Endif
  286.       Endif
  287.       If Mx%>114 And Mx%<166
  288.         Sget Current_screen$
  289.         Deffill 11,2,8
  290.         Fill 115,1
  291.         @Select_sound
  292.         @Help1
  293.       Endif
  294.       If Mx%>57 And Mx%<109
  295.         @Clear_junk
  296.         Sget Current_screen$
  297.         Deffill 3,2,8
  298.         Fill 58,1
  299.         @Select_sound
  300.         @Load_it
  301.         If Lsuccess%=1
  302.           @Guess_letters
  303.         Else
  304.           If Back%=1
  305.             Goto Check_back
  306.           Endif
  307.           Sput Current_screen$
  308.           Goto Check_back
  309.         Endif
  310.         Deffill 0,2,8
  311.         Fill 58,1
  312.         If Two_player%=1
  313.           If Active_player%=1
  314.             Active_player%=0
  315.           Else
  316.             Active_player%=1
  317.           Endif
  318.         Endif
  319.       Endif
  320.     Endif
  321.     Check_back:
  322.     Exit If Back%=1
  323.   Loop
  324.   Hidem
  325.   Sput Shell_screen$
  326.   Showm
  327. Return
  328. '
  329. ' ************************ INPUT LETTERS (PLAY) ****************************
  330. Procedure Guess_letters
  331.   Puzzle_piece%=Random(9)+1
  332.   @Give_a_hint
  333.   Word_length%=Len(Real_word$)
  334.   Lx%=179
  335.   For I%=1 To Word_length%
  336.     Gx%(I%)=Lx%
  337.     Add Lx%,11
  338.   Next I%
  339.   Wrong_guess_count%=0
  340.   Wrong_guess_count%=0
  341.   Deftext 1,0,0,13
  342.   Lx%=180
  343.   For I%=1 To Word_length%
  344.     Text Lx%,137,"_ "
  345.     Add Lx%,11
  346.   Next I%
  347.   For I%=1 To 26
  348.     Already_chosen%(I%)=0
  349.   Next I%
  350.   A%=0
  351.   Actual_count%=0
  352.   Score%(0)=0
  353.   Score%(1)=0
  354.   Do
  355.     If Two_player%=1
  356.       If Player_name$(Active_player%)=""
  357.         Your_turn$="Player "+Str$(Active_player%+1)+", guess a letter:"
  358.       Else
  359.         Your_turn$=Player_name$(Active_player%)+", guess a letter:"
  360.       Endif
  361.     Else
  362.       Your_turn$="                Guess a letter:"
  363.     Endif
  364.     Deftext 3,0,0,6
  365.     Text 58,35,Your_turn$
  366.     Repeat
  367.       Mouse Aa%,Bb%,Cbutton%
  368.     Until Cbutton%>0
  369.     @Let_go
  370.     If Aa%>0 And Aa%<52 And Bb%>0 And Bb%<18
  371.       @Exit_alert
  372.       If Yes%=1
  373.         Back%=1
  374.       Else
  375.         Sput Current_screen$
  376.       Endif
  377.     Endif
  378.     If Aa%>114 And Aa%<166 And Bb%>0 And Bb%<18
  379.       Sget Current_screen$
  380.       Deffill 11,2,8
  381.       Fill 115,1
  382.       @Select_sound
  383.       @Help1
  384.     Endif
  385.     If Aa%>177 And Aa%<312 And Bb%>44 And Bb%<101
  386.       Got_one%=0
  387.       Restore Alphabet_data
  388.       For I%=1 To 26
  389.         Read Lx%,Ly%,Alpha$,N%
  390.         If Aa%>Lx% And Aa%<Lx%+15 And Bb%>Ly% And Bb%<Ly%+19 And Already_chosen%(I%)=0
  391.           Guess$=Alpha$
  392.           Already_chosen%(I%)=1
  393.           Color 2
  394.           Box Lx%,Ly%,Lx%+15,Ly%+19
  395.           Deffill 0
  396.           Pbox Lx%+1,Ly%+1,Lx%+14,Ly%+18
  397.           For J%=1 To Word_length%
  398.             If Guess$=Mid$(Real_word$,J%,1)
  399.               Deftext 2,2,0,13
  400.               Text Lx%+4,Ly%+15,Alpha$
  401.               Deftext 2,0,0,13
  402.               Text Gx%(J%),132,Mid$(Real_word$,J%,1)
  403.               @Other_sound
  404.               Inc Actual_count%
  405.               Got_one%=1
  406.             Endif
  407.           Next J%
  408.           If Got_one%=1
  409.             @Clear_instructions
  410.             @Guess_right
  411.           Endif
  412.           If Got_one%=0
  413.             @Clear_instructions
  414.             Deftext 14,2,0,13
  415.             Text Lx%+4,Ly%+15,Guess$
  416.             @Other_sound2
  417.             @Guess_wrong
  418.             Got_one%=2
  419.             Inc Wrong_guess_count%
  420.           Endif
  421.           Color 3
  422.           Box Lx%,Ly%,Lx%+15,Ly%+19
  423.         Endif
  424.         Exit If Got_one%=1 Or Got_one%=2
  425.       Next I%
  426.     Endif
  427.     Exit If Back%=1
  428.     Exit If Actual_count%=Word_length%
  429.     Exit If Wrong_guess_count%=9
  430.     Exit If Bb%>0 And Bb%<52 And Aa%>0 And Aa%<18
  431.   Loop
  432.   If Back%=1
  433.     Goto No_more
  434.   Endif
  435.   If Bb%>0 And Bb%<52 And Aa%>0 And Aa%<18
  436.     Goto No_more
  437.   Endif
  438.   @Display_puzzle
  439.   If Actual_count%=Word_length%
  440.     Inc Puzzle%(Active_player%)
  441.   Endif
  442.   Score%(Active_player%)=9-Wrong_guess_count%
  443.   Score$="This Puzzle: "+Str$(Score%(Active_player%))
  444.   Deftext 2,0,0,6
  445.   Text 171,159,Score$
  446.   Total_score%(Active_player%)=Total_score%(Active_player%)+Score%(Active_player%)
  447.   @Report_score
  448.   If Actual_count%=Word_length%
  449.     Deftext 2,0,0,13
  450.     Text 219,36,"W O W !"
  451.     @Congrats_sound
  452.   Endif
  453.   If Wrong_guess_count%=9
  454.     Deftext 14,0,0,13
  455.     Text 214,36,"Too Bad!"
  456.     Deftext 14,0,0,6
  457.     Text 175,115,"The word was:"
  458.     For J%=1 To Word_length%
  459.       Deftext 2,0,0,13
  460.       Text Gx%(J%),132,Mid$(Real_word$,J%,1)
  461.     Next J%
  462.     @Dud_sound
  463.   Endif
  464.   @Clear_instructions
  465.   Showm
  466.   No_more:
  467. Return
  468. '
  469. Procedure Report_score
  470.   If Two_player%=1
  471.     @Clear_scores
  472.     Deftext 3,0,0,6
  473.     If Player_name$(0)=""
  474.       Total_score$(0)="Player 1 Total: "+Str$(Total_score%(0))
  475.       Text 171,169,Total_score$(0)
  476.     Else
  477.       Total_score$(0)="Total: "+Str$(Total_score%(0))
  478.       Text 243,169,Total_score$(0)
  479.       Text 171,169,Player_name$(0)
  480.     Endif
  481.     If Player_name$(1)=""
  482.       Total_score$(1)="Player 2 Total: "+Str$(Total_score%(1))
  483.       Text 171,189,Total_score$(1)
  484.     Else
  485.       Total_score$(1)="Total: "+Str$(Total_score%(1))
  486.       Text 243,189,Total_score$(1)
  487.       Text 171,189,Player_name$(1)
  488.     Endif
  489.     Deftext 3,0,0,6
  490.     Puzzle_total$(0)="# Puzzles: "+Str$(Puzzle%(0))
  491.     Puzzle_total$(1)="# Puzzles: "+Str$(Puzzle%(1))
  492.     Deftext 14,0,0,6
  493.     Text 211,179,Puzzle_total$(0)
  494.     Text 211,199,Puzzle_total$(1)
  495.   Else
  496.     @Clear_scores1
  497.     Deftext 3,0,0,6
  498.     If Player_name$(0)<>""
  499.       P$="Player: "+Player_name$(0)
  500.       Text 171,179,P$
  501.     Endif
  502.     Total_score$(0)="Total Points: "+Str$(Total_score%(Active_player%))
  503.     Text 171,189,Total_score$(0)
  504.     Puzzle_total$(0)="# Puzzles: "+Str$(Puzzle%(0))
  505.     Deftext 14,0,0,6
  506.     Text 195,199,Puzzle_total$(0)
  507.   Endif
  508. Return
  509. '
  510. Procedure Guess_right
  511.   Deftext 2,0,0,13
  512.   Text 175,36,"     Right!"
  513.   Pause 20
  514.   @Clear_instructions
  515. Return
  516. '
  517. Procedure Guess_wrong
  518.   Deftext 14,0,0,13
  519.   Text 175,36,"     Wrong!"
  520.   @Give_a_hint
  521.   Pause 20
  522.   @Clear_instructions
  523. Return
  524. '
  525. Procedure Give_a_hint
  526.   Restore Drw_box_puzzle_data
  527.   For I%=1 To 9
  528.     Read Plx%,Ply%,Prx%,Pry%
  529.     If I%=Puzzle_piece%
  530.       Put Plx%,Ply%,Puzzle$(I%)
  531.     Endif
  532.   Next I%
  533.   Inc Puzzle_piece%
  534.   If Puzzle_piece%>9
  535.     Puzzle_piece%=1
  536.   Endif
  537. Return
  538. '
  539. Procedure Display_puzzle
  540.   Restore Drw_box_puzzle_data
  541.   For I%=1 To 9
  542.     Read Plx%,Ply%,Prx%,Pry%
  543.     Put Plx%,Ply%,Puzzle$(I%)
  544.   Next I%
  545. Return
  546. '
  547. ' ********************************* CREATION ***************************
  548. Procedure Creation
  549.   Hidem
  550.   Sput Creation_screen$
  551.   ' SET UP DEFAULTS *********
  552.   Back%=0
  553.   Drw_type%=1
  554.   Just_loaded%=0
  555.   Deffill 2,2,8
  556.   Fill 247,111
  557.   Cc%=2
  558.   Fill 172,1
  559.   Fll_type%=2
  560.   Fll_style%=8
  561.   Deffill Cc%,Fll_type%,Fll_style%
  562.   Pbox 247,67,315,83
  563.   Defmouse 5
  564.   Showm
  565.   Sget Current_screen$
  566.   ' 97 is the pseudo-ASCII value of the second character returned when
  567.   ' the UNDO key is pressed.  If UNDO is pressed after adding a mark (a
  568.   ' line, circle, etc.) in the draw box, the previous version of the
  569.   ' drawbox is restored, as long as the user has not pressed the mouse
  570.   ' button since completing the drawing of that mark.
  571.   Do
  572.     @Let_go
  573.     Repeat
  574.       Mouse Mx%,My%,Button%
  575.       L$=Inkey$
  576.       If Asc(Right$(L$))=97
  577.         Sput Current_screen$
  578.       Endif
  579.     Until Button%>0
  580.     If Just_loaded%=1
  581.       Deffill 0,2,8
  582.       Pbox 57,19,160,40
  583.       Just_loaded%=0
  584.     Endif
  585.     ' LOAD OPTION ***********
  586.     If Mx%>0 And Mx%<52 And My%>22 And My%<40
  587.       Deffill 10,2,8
  588.       Fill 1,23
  589.       @Select_sound
  590.       Deffill 1,2,8
  591.       Pbox 6,50,160,193
  592.       @Load_it
  593.       @Display_puzzle
  594.       Pause 20
  595.       If Lsuccess%=1
  596.         Inc File_number%
  597.       Endif
  598.       Deffill 0,2,8
  599.       Fill 1,23
  600.       Just_loaded%=1
  601.     Endif
  602.     ' QUIT OPTION ***********
  603.     If My%>0 And My%<18
  604.       If Mx%>0 And Mx%<52
  605.         @Exit_alert
  606.         If Yes%=1
  607.           Back%=1
  608.         Else
  609.           Sput Current_screen$
  610.         Endif
  611.       Endif
  612.       ' SAVE OPTION ***********
  613.       If Mx%>57 And Mx%<109
  614.         @Done_with_it
  615.         Goto Dne_creating
  616.       Endif
  617.       ' HELP OPTION ***********
  618.       If Mx%>114 And Mx%<166
  619.         Sget Current_screen$
  620.         Deffill 11,2,8
  621.         Fill 115,1
  622.         @Select_sound
  623.         @Help2
  624.       Endif
  625.     Endif
  626.     ' COLOR CHOICES ***********
  627.     If Mx%>171 And Mx%<316
  628.       If My%>0 And My%<18
  629.         Restore Clor_choice_data1
  630.         For I%=1 To 6
  631.           Read Col%,Lx%
  632.           If Mx%>Lx% And Mx%<Lx%+20 And Col%<>Cc%
  633.             Put 171,0,Color_choice$
  634.             Cc%=Col%
  635.             Deffill Cc%,2,8
  636.             Fill Lx%+1,1
  637.             @Other_sound
  638.             @Filling_fill_box
  639.           Endif
  640.         Next I%
  641.         @Let_go
  642.       Endif
  643.       If My%>22 And My%<40
  644.         Restore Clor_choice_data2
  645.         For I%=1 To 6
  646.           Read Col%,Lx%
  647.           If Mx%>Lx% And Mx%<Lx%+20 And Col%<>Cc%
  648.             Put 171,0,Color_choice$
  649.             Cc%=Col%
  650.             Deffill Cc%,2,8
  651.             Fill Lx%+1,23
  652.             @Other_sound
  653.             @Filling_fill_box
  654.           Endif
  655.         Next I%
  656.         @Let_go
  657.       Endif
  658.       If My%>44 And My%<62
  659.         If Mx%>183 And Mx%<203 And Cc%<>0
  660.           Put 171,0,Color_choice$
  661.           Cc%=0
  662.           Deffill 8,2,8
  663.           Fill 184,45
  664.           @Other_sound
  665.           @Filling_fill_box
  666.         Endif
  667.         If Mx%>208 And Mx%<228 And Cc%<>1
  668.           Put 171,0,Color_choice$
  669.           Cc%=1
  670.           Deffill 8,2,8
  671.           Fill 209,45
  672.           @Other_sound
  673.           @Filling_fill_box
  674.         Endif
  675.         @Let_go
  676.       Endif
  677.     Endif
  678.     ' DRAWING OPTIONS: ***********
  679.     If Mx%>171 And Mx%<241
  680.       ' FILL OPTION *********
  681.       If My%>66 And My%<84 And Drw_type%<>0
  682.         @Clear_draw_options
  683.         Drw_type%=0
  684.         Deffill 2,2,8
  685.         Fill 172,67
  686.         @Other_sound
  687.       Endif
  688.       ' CIRCLE/FILLED CIRCLE OPTION ********
  689.       If My%>88 And My%<106 And Drw_type%<>5
  690.         @Clear_draw_options
  691.         Drw_type%=5
  692.         Deffill 2,2,8
  693.         Fill 172,89
  694.         @Other_sound
  695.       Endif
  696.       ' LINE OPTION *********
  697.       If My%>110 And My%<128 And Drw_type%<>2
  698.         @Clear_draw_options
  699.         Drw_type%=2
  700.         Deffill 2,2,8
  701.         Fill 172,111
  702.         @Other_sound
  703.       Endif
  704.       ' MAGNIFY ********
  705.       If My%>132 And My%<199
  706.         @Clear_draw_options
  707.         Drw_type%=6
  708.         Deffill 2,2,8
  709.         Fill 175,133
  710.         @Other_sound
  711.         @Magnify_draw
  712.         Put 176,134,Magnify_grid$
  713.         Deffill 1,2,8
  714.         Fill 175,133
  715.         ' DEFAULT TO FREEHAND WITH SMALL "DOT" AFTER EXITING MAGNIFY MODE
  716.         @Clear_draw_options
  717.         Drw_type%=1
  718.         Deffill 2,2,8
  719.         Fill 247,111
  720.         Color 1
  721.         Draw 298,119                !Position of small drawing nib indicator
  722.         Goto Dne_creating
  723.       Endif
  724.     Endif
  725.     If Mx%>246 And Mx%<316
  726.       ' FILL PATTERN BOX ********
  727.       If My%>66 And My%<84
  728.         @Fill_pattern_change
  729.         @Other_sound
  730.       Endif
  731.       ' FRAME ********
  732.       If My%>88 And My%<106 And Drw_type%<>4
  733.         @Clear_draw_options
  734.         Drw_type%=4
  735.         Deffill 2,2,8
  736.         Fill 247,89
  737.         @Other_sound
  738.       Endif
  739.       ' FREEHAND DRAW OPTION ********
  740.       If My%>110 And My%<128
  741.         If Drw_type%=1
  742.           ' FREEHAND WITH LARGE "DOT" ********
  743.           @Other_sound
  744.           Drw_type%=3
  745.           Deffill 1,2,8
  746.           Pbox 297,118,299,120        !Position of large drawing nib indicator
  747.         Else
  748.           ' FREEHAND WITH SMALL "DOT"
  749.           @Clear_draw_options
  750.           Drw_type%=1
  751.           Deffill 2,2,8
  752.           Fill 247,111
  753.           @Other_sound
  754.           Color 1
  755.           Draw 298,119                !Position of small drawing nib indicator
  756.         Endif
  757.       Endif
  758.       ' BLANK (ERASE ENTIRE DRAW BOX) *******
  759.       If My%>44 And My%<62
  760.         Deffill 2,2,8
  761.         Fill 247,45
  762.         @Other_sound
  763.         @Blank_pic
  764.         If Yes%=1
  765.           Deffill 1,2,8
  766.           Pbox 6,50,160,193
  767.           @Erase_sound
  768.         Else
  769.           Sput Current_screen$
  770.         Endif
  771.         Deffill 0,2,8
  772.         Fill 247,45
  773.       Endif
  774.     Endif
  775.     ' DRAW IN THE BOX **********
  776.     If Mx%>5 And Mx%<161 And My%>49 And My%<194
  777.       ' The user has pressed the mouse while in the draw box.  The currently-
  778.       ' selected Drw_type% will determine the kind of drawing done.  Longer
  779.       ' drawing routines are placed in subroutines (Procedures) below.
  780.       Aa%=Mx%
  781.       Bb%=My%
  782.       Sget Current_screen$
  783.       If Drw_type%=0
  784.         Deffill Cc%,Fll_type%,Fll_style%
  785.         Fill Mx%,My%
  786.       Endif
  787.       If Drw_type%=1
  788.         @Freehand_draw
  789.       Endif
  790.       If Drw_type%=2
  791.         @Line_draw
  792.       Endif
  793.       If Drw_type%=3
  794.         @Large_dot_freehand_draw
  795.       Endif
  796.       If Drw_type%=4
  797.         @Frame_draw
  798.       Endif
  799.       If Drw_type%=5
  800.         @Circle_draw
  801.       Endif
  802.     Endif
  803.     Dne_creating:
  804.     Exit If Back%=1
  805.   Loop
  806.   @Let_go
  807.   Hidem
  808.   Sput Shell_screen$
  809.   Defmouse 0
  810.   Showm
  811. Return
  812. '
  813. Procedure Fill_pattern_change
  814.   Fll_style%=Fll_style%+1
  815.   If Fll_type%=2 And Fll_style%=25
  816.     Fll_type%=3
  817.     Fll_style%=1
  818.   Endif
  819.   If Fll_type%=3 And Fll_style%=13
  820.     Fll_type%=2
  821.     Fll_style%=1
  822.   Endif
  823.   @Filling_fill_box
  824. Return
  825. '
  826. Procedure Filling_fill_box
  827.   If Cc%=0
  828.     Deffill 1,2,8
  829.   Else
  830.     Deffill 0,2,8
  831.   Endif
  832.   Pbox 247,67,315,83
  833.   Deffill Cc%,Fll_type%,Fll_style%
  834.   Pbox 247,67,315,83
  835. Return
  836. '
  837. Procedure Freehand_draw
  838.   Color Cc%
  839.   First_dot%=1
  840.   Do
  841.     Mouse Aa%,Bb%,Cbutton%
  842.     Exit If Cbutton%=0
  843.     Exit If Aa%<6 Or Aa%>160 Or Bb%<50 Or Bb%>193
  844.     If Aa%>5 And Aa%<161 And Bb%>49 And Bb%<194
  845.       If First_dot%=1
  846.         Hidem
  847.       Endif
  848.       First_dot%=0
  849.       Draw Aa%,Bb%
  850.     Endif
  851.   Loop
  852.   Showm
  853. Return
  854. '
  855. Procedure Line_draw
  856.   @Let_go
  857.   If Aa%>5 And Aa%<161 And Bb%>49 And Bb%<194
  858.     Point_x1%=Aa%
  859.     Point_y1%=Bb%
  860.   Endif
  861.   Sget Current_screen$
  862.   Color 0
  863.   Hidem
  864.   ' A "rubber" line is created in this loop.  If the mouse is inside the draw
  865.   ' box, the mouse is hidden, and the end of the rubber line serves to indicate
  866.   ' where the mouse is.  If the user moves the mouse outside the draw box,
  867.   ' the rubber line disappears, but the mouse is shown.  If the mouse is clicked
  868.   ' inside the draw box (left button), the computer will draw a line from the
  869.   ' beginning point determined above to the current position of the mouse.
  870.   ' If the right mouse button is clicked, no line will be drawn and the program
  871.   ' will exit this subroutine.  If either (or both) buttons are clicked when
  872.   ' the mouse is outside the draw box, no line will be drawn and the program
  873.   ' will exit this subroutine.
  874.   Repeat
  875.     Mouse Aa%,Bb%,Cbutton%
  876.     If Aa%>5 And Aa%<161 And Bb%>49 And Bb%<194 And (Last_aa%<>Aa% Or Last_bb%<>Bb%)
  877.       Sput Current_screen$
  878.       Hidem
  879.       Draw Point_x1%,Point_y1% To Aa%,Bb%
  880.     Endif
  881.     If Aa%<6 Or Aa%>160 Or Bb%<50 Or Bb%>193 And (Last_aa%<>Aa% Or Last_bb%<>Bb%)
  882.       Sput Current_screen$
  883.       Showm
  884.     Endif
  885.     Last_aa%=Aa%
  886.     Last_bb%=Bb%
  887.   Until Cbutton%>0
  888.   Showm
  889.   @Let_go
  890.   If Cbutton%=2 Or Cbutton%=3
  891.     Sput Current_screen$
  892.     Goto No_line
  893.   Endif
  894.   If Cbutton%=1 And Aa%>5 And Aa%<161 And Bb%>49 And Bb%<194
  895.     Color Cc%
  896.     Point_x2%=Aa%
  897.     Point_y2%=Bb%
  898.     Draw Point_x1%,Point_y1% To Point_x2%,Point_y2%
  899.   Endif
  900.   No_line:
  901. Return
  902. '
  903. Procedure Frame_draw
  904.   @Let_go
  905.   If Aa%>5 And Aa%<161 And Bb%>49 And Bb%<194
  906.     Point_x1%=Aa%
  907.     Point_y1%=Bb%
  908.   Endif
  909.   Sget Current_screen$
  910.   Color 0
  911.   Hidem
  912.   ' A "rubber" frame is created in this loop.  If the mouse is inside the draw
  913.   ' box, the mouse is hidden, and the lower right-hand corner of the rubber
  914.   ' frame indicates where the mouse is.  If the user moves the mouse outside
  915.   ' the draw box, the rubber line disappears, but the mouse is shown.  If the
  916.   ' left mouse button is clicked inside the draw box, the computer will draw a
  917.   ' frame from the upper left-hand corner (beginning point) determined above
  918.   ' to the lower right-hand corner determined by the current position of the
  919.   ' mouse.
  920.   ' If the right mouse button is clicked, no frame will be drawn and the program
  921.   ' will exit this subroutine.  If either (or both) buttons are clicked when
  922.   ' the mouse is outside the draw box, no frame will be drawn and the program
  923.   ' will exit this subroutine.
  924.   Repeat
  925.     Mouse Aa%,Bb%,Cbutton%
  926.     If Aa%>5 And Aa%<161 And Bb%>49 And Bb%<194 And (Last_aa%<>Aa% Or Last_bb%<>Bb%)
  927.       Sput Current_screen$
  928.       Hidem
  929.       Box Point_x1%,Point_y1%,Aa%,Bb%
  930.     Endif
  931.     If Aa%<6 Or Aa%>160 Or Bb%<50 Or Bb%>193 And (Last_aa%<>Aa% Or Last_bb%<>Bb%)
  932.       Sput Current_screen$
  933.       Showm
  934.     Endif
  935.     Last_aa%=Aa%
  936.     Last_bb%=Bb%
  937.   Until Cbutton%>0
  938.   Showm
  939.   @Let_go
  940.   If Cbutton%=2 Or Cbutton%=3
  941.     Sput Current_screen$
  942.     Goto No_frame
  943.   Endif
  944.   If Cbutton%=1 And Aa%>5 And Aa%<161 And Bb%>49 And Bb%<194
  945.     Color Cc%
  946.     Point_x2%=Aa%
  947.     Point_y2%=Bb%
  948.     Box Point_x1%,Point_y1%,Point_x2%,Point_y2%
  949.   Endif
  950.   No_frame:
  951. Return
  952. '
  953. Procedure Circle_draw
  954.   Color Cc%
  955.   @Let_go
  956.   If Aa%>5 And Aa%<161 And Bb%>49 And Bb%<194
  957.     Hub_x%=Aa%
  958.     Hub_y%=Bb%
  959.   Endif
  960.   Sget Current_screen$
  961.   Color 0
  962.   Hidem
  963.   ' A "rubber" circle is created in this loop.  If the mouse is inside the draw
  964.   ' box and the entire circle fits inside the draw box, the mouse is hidden,
  965.   ' and the rim of the circle indicates where the mouse is.  If the user moves
  966.   ' the mouse out of the draw box or the circle becomes too large to fit within
  967.   ' the draw box, the rubber circle disapears and the mouse is shown. If the
  968.   ' left mouse button is clicked inside the draw box and the circle would fit
  969.   ' within the draw box, the computer will draw a circle using the hub
  970.   ' (beginning point) determined above and the radius determined by the
  971.   ' current position of the mouse.
  972.   ' If the right mouse button is clicked (or both buttons), no circle will be
  973.   ' drawn and the computer will exit this subroutine.  If either or both buttons
  974.   ' are clicked when the mouse is outside the draw box or when the circle will
  975.   ' not fit within the draw box, no circle will be drawn and the computer will
  976.   ' exit this subroutine.
  977.   Repeat
  978.     Mouse Aa%,Bb%,Cbutton%
  979.     If Aa%>5 And Aa%<161 And Bb%>49 And Bb%<194 And (Last_aa%<>Aa% Or Last_bb%<>Bb%)
  980.       Radius%=Int(Sqr((Aa%-Hub_x%)*(Aa%-Hub_x%)+(Bb%-Hub_y%)*(Bb%-Hub_y%)))
  981.       If Hub_x%-Radius%>5 And Hub_y%-Radius%>49 And Radius%+Hub_x%<161 And Radius%+Hub_y%<194
  982.         Sput Current_screen$
  983.         Hidem
  984.         Circle Hub_x%,Hub_y%,Radius%
  985.       Else
  986.         Sput Current_screen$
  987.         Showm
  988.       Endif
  989.     Endif
  990.     If (Aa%<6 Or Aa%>160 Or Bb%<50 Or Bb%>193 And (Last_aa%<>Aa% Or Last_bb%<>Bb%))
  991.       Sput Current_screen$
  992.       Showm
  993.     Endif
  994.     Last_aa%=Aa%
  995.     Last_bb%=Bb%
  996.   Until Cbutton%>0
  997.   Showm
  998.   @Let_go
  999.   If Cbutton%=2 Or Cbutton%=3
  1000.     Sput Current_screen$
  1001.     Goto No_circle
  1002.   Endif
  1003.   If Cbutton%=1
  1004.     Rim_x%=Aa%-Hub_x%
  1005.     Rim_y%=Bb%-Hub_y%
  1006.     Radius%=Int(Sqr(Rim_x%*Rim_x%+Rim_y%*Rim_y%))
  1007.     If Hub_x%-Radius%>5 And Hub_y%-Radius%>49 And Radius%+Hub_x%<161 And Radius%+Hub_y%<194
  1008.       Color Cc%
  1009.       Circle Hub_x%,Hub_y%,Radius%
  1010.     Endif
  1011.   Endif
  1012.   No_circle:
  1013. Return
  1014. '
  1015. Procedure Large_dot_freehand_draw
  1016.   Defmouse 6
  1017.   Deffill Cc%,2,8
  1018.   First_dot%=1
  1019.   Do
  1020.     Mouse Aa%,Bb%,Cbutton%
  1021.     Exit If Cbutton%=0
  1022.     Exit If Aa%<7 Or Aa%>159 Or Bb%<51 Or Bb%>192
  1023.     If Aa%>6 And Aa%<160 And Bb%>50 And Bb%<193
  1024.       If First_dot%=1
  1025.         Hidem
  1026.       Endif
  1027.       First_dot%=0
  1028.       Pbox Aa%-1,Bb%-1,Aa%+1,Bb%+1
  1029.     Endif
  1030.   Loop
  1031.   Defmouse 5
  1032.   Showm
  1033. Return
  1034. '
  1035. Procedure Magnify_draw
  1036.   ' First, the user selects a section of the drawing screen to be magnified.
  1037.   ' If the mouse is on the draw box, a black frame of the correct dimensions
  1038.   ' (16 pixels wide by 8 high) will be shown instead of the mouse.  If the
  1039.   ' frame cannot fit on the draw box because of the mouse's location, the mouse
  1040.   ' is shown as an arrow.  If the left button is pressed while the frame is
  1041.   ' shown, a red frame will surround the defined block and the magnified grid
  1042.   ' will fill with the appropriate color(s).  If the right button (or both
  1043.   ' buttons) is pressed, the computer will exit this subroutine without
  1044.   ' magnifying a block.
  1045.   Magnified_it%=0
  1046.   Flled_it%=0
  1047.   @Let_go
  1048.   Defmouse 0
  1049.   Get 4,49,162,194,Rubber_box$
  1050.   Sget Current_screen$
  1051.   Color 0
  1052.   Didnt_catch_it:
  1053.   Repeat
  1054.     Mouse Aa%,Bb%,Cbutton%
  1055.     Exit If Cbutton%>1
  1056.     If Aa%<6 Or Aa%>161-17 Or Bb%<50 Or Bb%>194-8 And (Last_bb%<>Bb% Or Last_aa%<>Aa%)
  1057.       Sput Current_screen$
  1058.       Showm
  1059.     Endif
  1060.     If Aa%>5 And Aa%<162-17 And Bb%>49 And Bb%<195-8 And (Last_bb%<>Bb% Or Last_aa%<>Aa%)
  1061.       Sput Current_screen$
  1062.       Hidem
  1063.       Box Aa%-1,Bb%-1,Aa%+17,Bb%+8
  1064.     Endif
  1065.     Last_aa%=Aa%
  1066.     Last_bb%=Bb%
  1067.   Until Cbutton%=1
  1068.   If Cbutton%>1
  1069.     Goto No_magnify
  1070.   Endif
  1071.   Hidem
  1072.   @Let_go
  1073.   ' In the clause below, the computer indicates a defined block by putting
  1074.   ' a red frame around it on the draw box.  If the left mouse button has
  1075.   ' been pressed while the mouse was not on the draw box, the user will
  1076.   ' have another chance to define a block.
  1077.   If Aa%>4 And Aa%<162-17 And Bb%>49 And Bb%<195-8
  1078.     Sput Current_screen$
  1079.     Color 2
  1080.     Box Aa%-1,Bb%-1,Aa%+17,Bb%+8
  1081.   Else
  1082.     Goto Didnt_catch_it
  1083.   Endif
  1084.   ' In the loop below, the computer examines each pixel in the defined block
  1085.   ' and fills the corresponding square in the magnified grid with that
  1086.   ' pixel's color.
  1087.   Llx%=Aa%-1
  1088.   Lly%=Bb%-1
  1089.   Get Llx%+1,Lly%+1,Llx%+17,Lly%+8,Magni_block$
  1090.   Lx%=176
  1091.   Ly%=134
  1092.   For I%=1 To 8
  1093.     For J%=1 To 17
  1094.       Dt_color%(J%,I%)=Point(J%+Llx%,I%+Lly%)
  1095.       Deffill Dt_color%(J%,I%),2,8
  1096.       Pbox Lx%+1,Ly%+1,Lx%+7,Ly%+7
  1097.       Add Lx%,8
  1098.     Next J%
  1099.     Add Ly%,8
  1100.     Lx%=176
  1101.   Next I%
  1102.   Showm
  1103.   ' Now the user has an opportunity to draw directly on the magnified grid.
  1104.   ' The changes made here will also be reflected in the draw box.
  1105.   ' If the right button is pressed (or both buttons), the computer will exit
  1106.   ' the subroutine and the magnify mode.  The drawing mode will return to the
  1107.   ' default (draw with a small dot).
  1108.   Do
  1109.     Flled_it%=0
  1110.     Repeat
  1111.       Mouse Mx%,My%,Button%
  1112.       Exit If Mx%>176 And My%>133 And Mx%<312 And My%<199
  1113.     Until Button%=0
  1114.     Repeat
  1115.       Mouse Aa%,Bb%,Cbutton%
  1116.     Until Cbutton%>0
  1117.     Get Llx%+1,Lly%+1,Llx%+17,Lly%+8,Magni_block$
  1118.     Exit If Cbutton%>1
  1119.     If (Aa%>171 And Bb%>130 And Aa%<319 And Bb%<199) Or (Aa%>171 And Bb%>0 And Aa%<319 And Bb%<65)
  1120.       Target_hit%=1
  1121.       ' * mouse is in the general area of the magnification grid or color choices
  1122.     Else
  1123.       Target_hit%=0
  1124.     Endif
  1125.     Exit If Target_hit%=0
  1126.     ' COLOR CHOICES ***********
  1127.     If Aa%>171 And Aa%<316 And Bb%>0 And Bb%<62
  1128.       If Bb%>0 And Bb%<18
  1129.         Restore Clor_choice_data1
  1130.         For I%=1 To 6
  1131.           Read Col%,Lx%
  1132.           If Aa%>Lx% And Aa%<Lx%+20 And Col%<>Cc%
  1133.             Put 171,0,Color_choice$
  1134.             Cc%=Col%
  1135.             Deffill Cc%,2,8
  1136.             Fill Lx%+1,1
  1137.             @Filling_fill_box
  1138.           Endif
  1139.         Next I%
  1140.       Endif
  1141.       If Bb%>22 And Bb%<40
  1142.         Restore Clor_choice_data2
  1143.         For I%=1 To 6
  1144.           Read Col%,Lx%
  1145.           If Aa%>Lx% And Aa%<Lx%+20 And Col%<>Cc%
  1146.             Put 171,0,Color_choice$
  1147.             Cc%=Col%
  1148.             Deffill Cc%,2,8
  1149.             Fill Lx%+1,23
  1150.             @Filling_fill_box
  1151.           Endif
  1152.         Next I%
  1153.       Endif
  1154.       If Bb%>44 And Bb%<62
  1155.         If Aa%>183 And Aa%<203 And Cc%<>0
  1156.           Put 171,0,Color_choice$
  1157.           Cc%=0
  1158.           Deffill 8,2,8
  1159.           Fill 184,45
  1160.           @Filling_fill_box
  1161.         Endif
  1162.         If Aa%>208 And Aa%<228 And Cc%<>1
  1163.           Put 171,0,Color_choice$
  1164.           Cc%=1
  1165.           Deffill 8,2,8
  1166.           Fill 209,45
  1167.           @Filling_fill_box
  1168.         Endif
  1169.       Endif
  1170.     Endif
  1171.     If Point(Aa%,Bb%)<>Cc% And Aa%>176 And Aa%<312 And Bb%>134 And Bb%<199
  1172.       Lx%=176
  1173.       Ly%=134
  1174.       For I%=1 To 8
  1175.         For J%=1 To 17
  1176.           If Aa%>Lx% And Aa%<Lx%+8 And Bb%>Ly% And Bb%<Ly%+8
  1177.             Color Cc%
  1178.             Draw J%+Llx%,I%+Lly%
  1179.             Deffill Cc%,2,8
  1180.             Pbox Lx%+1,Ly%+1,Lx%+7,Ly%+7
  1181.             Magnified_it%=1
  1182.             Flled_it%=1
  1183.           Endif
  1184.           Exit If Flled_it%=1
  1185.           Add Lx%,8
  1186.         Next J%
  1187.         Exit If Flled_it%=1
  1188.         Add Ly%,8
  1189.         Lx%=176
  1190.       Next I%
  1191.     Endif
  1192.   Loop
  1193.   No_magnify:
  1194.   Put 4,49,Rubber_box$
  1195.   @Let_go
  1196.   If Magnified_it%=1
  1197.     Put Llx%+1,Lly%+1,Magni_block$
  1198.   Endif
  1199.   Defmouse 5
  1200.   Showm
  1201. Return
  1202. '
  1203. ' *************************** COLOR PALETTE **********************
  1204. Procedure Set_color
  1205.   Setcolor 0,0,0,0            !=Color# 0, BLACK (BACKGROUND)
  1206.   Setcolor 15,7,7,7           !=Color# 1, WHITE
  1207.   Setcolor 1,7,0,0            !=Color# 2, RED
  1208.   Setcolor 2,0,6,0            !=Color# 3, LIGHT GREEN
  1209.   Setcolor 4,5,2,0            !=Color# 4, BROWN
  1210.   Setcolor 6,0,0,7            !=Color# 5, BRIGHT BLUE
  1211.   Setcolor 3,0,5,0            !=Color# 6, DARK GREEN
  1212.   Setcolor 5,2,4,7            !=Color# 7, LIGHT BLUE
  1213.   Setcolor 7,6,6,6            !=Color# 8, LIGHT GREY
  1214.   Setcolor 8,0,0,0            !=Color# 9, OTHER BLACK
  1215.   Setcolor 9,7,3,4            !=Color# 10, PINK
  1216.   Setcolor 10,7,3,0           !=Color# 11, ORANGE
  1217.   Setcolor 12,7,5,0           !=Color# 12, GOLD
  1218.   Setcolor 14,6,0,7           !=Color# 13, LIGHT PURPLE
  1219.   Setcolor 11,7,7,0           !=Color# 14, LIGHT YELLOW
  1220.   Setcolor 13,5,0,5           !=Color# 15, DARK PURPLE
  1221. Return
  1222. '
  1223. Procedure Black_screen
  1224.   For I%=0 To 15
  1225.     Setcolor I%,0,0,0
  1226.   Next I%
  1227. Return
  1228. '
  1229. Procedure Check_rez
  1230.   Rez%=Xbios(4)
  1231.   If Rez%<>0
  1232.     Alrt$=" |This program requires|  Low Resolution."
  1233.     Alert 3,Alrt$,1,"Oops!",Dummy%
  1234.     End
  1235.   Endif
  1236. Return
  1237. '
  1238. Procedure Save_palette
  1239.   For I%=0 To 15
  1240.     Palette%(I%)=Xbios(7,W:I%,W:-1)
  1241.   Next I%
  1242. Return
  1243. '
  1244. Procedure Restore_palette
  1245.   For I%=0 To 15
  1246.     Setcolor I%,Palette%(I%)
  1247.   Next I%
  1248. Return
  1249. '
  1250. ' ************************* MOUSE CHECKS *************************
  1251. Procedure Help_check_mouse
  1252.   Deftext 0,0,0,6
  1253.   If Argh%=1
  1254.     Text 52,Ly%+12," ARGH!"
  1255.   Else
  1256.     Text 50,Ly%+12,"CONTINUE"
  1257.   Endif
  1258.   Repeat
  1259.     Mouse Aa%,Bb%,Cbutton%
  1260.   Until Aa%>21 And Aa%<145 And Bb%>Ly% And Bb%<Ly%+15 And Cbutton%>0
  1261.   Deffill Df%,2,8
  1262.   Fill 22,Ly%+1
  1263.   @Alert_sound
  1264.   Pause 15
  1265. Return
  1266. '
  1267. Procedure Check_mouse
  1268.   @Let_go
  1269.   Repeat
  1270.     Mouse Aa%,Bb%,Cbutton%
  1271.   Until Cbutton%>0 And Bb%>Ly% And Bb%<Ly%+18 And ((Aa%>21 And Aa%<81) Or (Aa%>85 And Aa%<145))
  1272.   Deffill Df%,2,8
  1273.   If Aa%>21 And Aa%<81
  1274.     Fill 22,Ly%+1
  1275.     Yes%=1
  1276.   Else
  1277.     Fill 86,Ly%+1
  1278.     Yes%=0
  1279.   Endif
  1280.   @Alert_sound
  1281.   Pause 20
  1282. Return
  1283. '
  1284. '
  1285. Procedure Let_go
  1286.   Repeat
  1287.     Mouse Aaa%,Bbb%,Ccc%
  1288.   Until Ccc%=0
  1289. Return
  1290. '
  1291. ' ****************************** SCREENS **************************
  1292. Procedure Shell_screen
  1293.   Deftext 2,1,0,13
  1294.   Text 98,13,"W U Z Z L E R S"
  1295.   Deftext 14,0,0,6
  1296.   Text 37,25,"A Word and Picture Puzzle Game"
  1297.   Deftext 3,1,0,4
  1298.   Text 45,35,"YET ANOTHER KIDPRG  IN GFA BASIC FROM"
  1299.   Deftext 3,0,0,4
  1300.   Text 155,35,Chr$(191)
  1301.   Deftext 2,0,0,6
  1302.   Text 35,45,"         D.A. Brumleve"
  1303.   Deftext 14,5,0,4
  1304.   Text 60,54,"                      ST-LOG"
  1305.   Deftext 14,1,0,4
  1306.   Text 60,54,"    COPYRIGHT 1989 BY"
  1307.   Deftext 2,1,0,4
  1308.   Text 225,13,"VERSION 4.1"
  1309.   Deftext 2,0,0,6
  1310.   Text 35,75,"As published originally in    !"
  1311.   Sty%=6
  1312.   Stx%=48
  1313.   Color 3
  1314.   Box 204+Stx%,52+Sty%,224+Stx%,73+Sty%
  1315.   Color 2
  1316.   Box 205+Stx%,53+Sty%,223+Stx%,72+Sty%
  1317.   Deffill 2,2,8
  1318.   Pbox 205+Stx%,66+Sty%,223+Stx%,72+Sty%
  1319.   Deffill 3,2,8
  1320.   Pbox 206+Stx%,54+Sty%,222+Stx%,65+Sty%
  1321.   Deftext 2,1,0,13
  1322.   Text 207+Stx%,65+Sty%," T"
  1323.   Text 205+Stx%,65+Sty%,"S"
  1324.   Deftext 3,1,0,4
  1325.   Text 205+Stx%,71+Sty%,"LOG"
  1326.   Color 1
  1327.   Restore Shell_data
  1328.   For I%=1 To 3
  1329.     Read Lx%,Ly%,Rx%,Ry%,C%,I$,Tx%
  1330.     Box Lx%,Ly%,Rx%,Ry%
  1331.     Box Lx%+3,Ly%+3,Rx%-3,Ry%-3
  1332.     Deffill C%,2,8
  1333.     Pbox Lx%+4,Ly%+4,Rx%-4,Ry%-4
  1334.     If I%=3
  1335.       Deftext 0,1,0,13
  1336.     Else
  1337.       Deftext 0,0,0,13
  1338.     Endif
  1339.     Text Tx%,Ly%+32,I$
  1340.   Next I%
  1341. Return
  1342. '
  1343. Procedure All_screens
  1344.   ' This routine draws the EXIT,PLAY/SAVE,HELP, and MAKE boxes and the puzzle box.
  1345.   Restore All_screens_data
  1346.   For I%=1 To 3
  1347.     Read C%,C$,Cx%,Lx%,Ly%,Rx%,Ry%
  1348.     Color 1
  1349.     Box Lx%,Ly%,Rx%,Ry%
  1350.     Box Lx%+3,Ly%+3,Rx%-3,Ry%-3
  1351.     Deffill C%,2,8
  1352.     Pbox Lx%+4,Ly%+4,Rx%-4,Ry%-4
  1353.     Deftext 0,0,0,6
  1354.     Text Cx%,Ry%-6,C$
  1355.   Next I%
  1356.   Read Lx%,Ly%,Rx%,Ry%
  1357.   Color 1
  1358.   Box Lx%,Ly%,Rx%,Ry%
  1359.   Box Lx%+3,Ly%+3,Rx%-3,Ry%-3
  1360.   Deffill 1,2,8
  1361.   Pbox Lx%+6,Ly%+6,Rx%-6,Ry%-6
  1362.   Deffill 9,2,8
  1363.   Fill Lx%+5,Ly%+5
  1364. Return
  1365. '
  1366. Procedure Main_screen
  1367.   Color 12
  1368.   Box 171,0,319,18
  1369.   Deftext 2,0,0,13
  1370.   Text 186,15,"W U Z Z L E R S"
  1371.   Deftext 3,0,0,13
  1372.   Color 3
  1373.   Restore Alphabet_data
  1374.   For I%=1 To 26
  1375.     Read Lx%,Ly%,Alpha$,N%
  1376.     Box Lx%,Ly%,Lx%+15,Ly%+19
  1377.     Text Lx%+4,Ly%+15,Alpha$
  1378.   Next I%
  1379.   Get 177,44,297+15,82+19,Alphabet_grid$
  1380. Return
  1381. '
  1382. Procedure Creation_screen
  1383.   ' This routine draws the special boxes used in the creation segment of the
  1384.   ' program: color choices, drawing options, "SAVE" box
  1385.   Restore Creation_screen_data
  1386.   Ly%=0
  1387.   Jj%=6
  1388.   For I%=1 To 3
  1389.     If I%=3
  1390.       Jj%=2
  1391.     Endif
  1392.     For J%=1 To Jj%
  1393.       Read C%,Lx%
  1394.       Color 1
  1395.       Box Lx%,Ly%,Lx%+20,Ly%+18
  1396.       Box Lx%+3,Ly%+3,Lx%+17,Ly%+15
  1397.       Deffill C%,2,8
  1398.       Pbox Lx%+4,Ly%+4,Lx%+16,Ly%+14
  1399.     Next J%
  1400.     Add Ly%,22
  1401.   Next I%
  1402.   Deffill 14,2,8
  1403.   Pbox 61,4,105,14
  1404.   Deftext 0,0,0,6
  1405.   Text 67,12,"SAVE"
  1406.   Deffill 10,2,8
  1407.   Pbox 4,26,48,36
  1408.   Color 1
  1409.   Box 0,22,52,40
  1410.   Box 3,25,49,37
  1411.   Deftext 0,0,0,6
  1412.   Text 10,34,"LOAD"
  1413.   Lx%=171
  1414.   For I%=1 To 2
  1415.     Ly%=66
  1416.     For J%=1 To 3
  1417.       Box Lx%,Ly%,Lx%+70,Ly%+18
  1418.       Box Lx%+3,Ly%+3,Lx%+67,Ly%+15
  1419.       Add Ly%,22
  1420.     Next J%
  1421.     Lx%=246
  1422.   Next I%
  1423.   Deftext 1,0,0,6
  1424.   Ly%=66
  1425.   For J%=1 To 3
  1426.     Read Cx%,C$
  1427.     Text Cx%,Ly%+12,C$
  1428.     Add Ly%,22
  1429.   Next J%
  1430.   Ly%=88
  1431.   For J%=1 To 2
  1432.     Read Cx%,C$
  1433.     Text Cx%,Ly%+12,C$
  1434.     Add Ly%,22
  1435.   Next J%
  1436.   Color 0
  1437.   Box 249,69,313,81
  1438.   Color 1
  1439.   Box 246,44,316,62
  1440.   Box 249,47,313,59
  1441.   Deftext 1,0,0,6
  1442.   Text 261,56,"BLANK"
  1443.   Draw 298,119                !Position of small drawing nib indicator
  1444.   Deffill 1,2,8
  1445.   Pbox 171,132,316,199
  1446.   Deffill 9,3,12
  1447.   Fill 172,156
  1448.   Get 176,136,312,199,Magnify_grid$
  1449.   Deffill 0,2,8
  1450.   Pbox 171,132,316,199
  1451.   Color 1
  1452.   Box 175,133,313,199
  1453.   Color 9
  1454.   Draw 176,198 To 312,198
  1455.   Put 176,134,Magnify_grid$
  1456.   Get 171,88,316,150,Clear_draw_options$
  1457. Return
  1458. '
  1459. ' ****************************** INSTRUCTIONS ********************
  1460. Procedure Done_with_it
  1461.   Df%=14
  1462.   Ly%=145
  1463.   Qy%=25
  1464.   Deffill Df%,2,8
  1465.   Fill 58,11
  1466.   @Select_sound
  1467.   Sget Current_screen$
  1468.   Pbox 6,50,160,193
  1469.   @Yes_or_no
  1470.   Deftext 0,0,0,6
  1471.   Text 10,65+Qy%,"  Do you want to"
  1472.   Text 7,75+Qy%," save this picture"
  1473.   Text 10,85+Qy%," to use as a word"
  1474.   Text 10,95+Qy%,"      puzzle?"
  1475.   @Check_mouse
  1476.   If Yes%=1
  1477.     @Save_it
  1478.   Endif
  1479.   Sput Current_screen$
  1480.   Deffill 0,2,8
  1481.   Fill 58,11
  1482. Return
  1483. '
  1484. Procedure Exit_alert
  1485.   Sget Current_screen$
  1486.   Deffill 2,2,8
  1487.   Fill 1,1
  1488.   @Select_sound
  1489.   Deffill 2,2,8
  1490.   Pbox 6,50,160,193
  1491.   Df%=2
  1492.   Ly%=145
  1493.   Qy%=25
  1494.   @Yes_or_no
  1495.   Text 16,75+Qy%,"  Do you really"
  1496.   Text 16,85+Qy%,"  want to quit?"
  1497.   @Check_mouse
  1498. Return
  1499. '
  1500. Procedure Exit_alert2
  1501.   Deffill 2,2,8
  1502.   Fill 84,148
  1503.   @Select_sound
  1504.   Deffill 2,2,8
  1505.   Pbox 83+4,147+4,225-4,199-4
  1506.   Df%=2
  1507.   Ly%=175
  1508.   Qy%=141
  1509.   Color 0
  1510.   R%=71
  1511.   Box 21+R%,Ly%,81+R%,Ly%+18
  1512.   Box 85+R%,Ly%,145+R%,Ly%+18
  1513.   Box 24+R%,Ly%+3,78+R%,Ly%+15
  1514.   Box 88+R%,Ly%+3,142+R%,Ly%+15
  1515.   Deffill 1,2,8
  1516.   Fill 22+R%,Ly%+1
  1517.   Fill 86+R%,Ly%+1
  1518.   Deftext 0,0,0,6
  1519.   Text 37+R%,Ly%+12,"Yes."
  1520.   Text 104+R%,Ly%+12,"No!"
  1521.   Text 93,160," Do you really"
  1522.   Text 93,170," want to quit?"
  1523.   @Let_go
  1524.   Repeat
  1525.     Mouse Aa%,Bb%,Cbutton%
  1526.   Until Cbutton%>0 And Bb%>Ly% And Bb%<Ly%+18 And ((Aa%>21+R% And Aa%<81+R%) Or (Aa%>85+R% And Aa%<145+R%))
  1527.   Deffill Df%,2,8
  1528.   If Aa%>21+R% And Aa%<81+R%
  1529.     Fill 22+R%,Ly%+1
  1530.     Yes%=1
  1531.   Else
  1532.     Fill 86+R%,Ly%+1
  1533.     Yes%=0
  1534.   Endif
  1535.   @Alert_sound
  1536.   Pause 15
  1537. Return
  1538. '
  1539. Procedure How_many
  1540.   Deffill 3,2,8
  1541.   Pbox 6,50,160,193
  1542.   Df%=3
  1543.   Ly%=145
  1544.   Qy%=25
  1545.   @Yes_or_no
  1546.   Text 8,75+Qy%," Will two players"
  1547.   Text 10,85+Qy%," play this game?"
  1548.   @Set_color
  1549.   @Check_mouse
  1550.   If Yes%=1
  1551.     Two_player%=1
  1552.   Else
  1553.     Two_player%=0
  1554.     Active_player%=0
  1555.   Endif
  1556.   Qy%=15
  1557.   Deffill 3,2,8
  1558.   Pbox 6,50,160,193
  1559.   Deftext 0,0,0,6
  1560.   If Two_player%=1
  1561.     Text 9,75+Qy%,"  Player 1, type"
  1562.     Text 12,85+Qy%,"  your name and"
  1563.     Text 15,95+Qy%," press <Return>."
  1564.   Else
  1565.     Text 19,85+Qy%,"Type your name"
  1566.     Text 10,95+Qy%,"and press <Return>."
  1567.   Endif
  1568.   @Get_word2
  1569.   Player_name$(0)=Nw_word$
  1570.   If Two_player%=1
  1571.     Deffill 3,2,8
  1572.     Pbox 6,50,160,193
  1573.     Deftext 0,0,0,6
  1574.     Text 9,75+Qy%,"  Player 2, type"
  1575.     Text 12,85+Qy%,"  your name and"
  1576.     Text 15,95+Qy%," press <Return>."
  1577.     @Get_word2
  1578.     Player_name$(1)=Nw_word$
  1579.   Endif
  1580.   Sput Main_screen$
  1581.   Showm
  1582. Return
  1583. '
  1584. Procedure Blank_pic
  1585.   Sget Current_screen$
  1586.   Blank_it%=0
  1587.   Deffill 8,2,8
  1588.   Pbox 6,50,160,193
  1589.   Df%=8
  1590.   Ly%=145
  1591.   Qy%=25
  1592.   @Yes_or_no
  1593.   Text 10,75+Qy%,"  Do you want to"
  1594.   Text 8,85+Qy%,"erase this picture?"
  1595.   @Check_mouse
  1596.   If Yes%=1
  1597.     Blank_it%=1
  1598.   Else
  1599.     Blank_it%=0
  1600.   Endif
  1601. Return
  1602. '
  1603. Procedure No_new_word
  1604.   @Oopsy
  1605.   Text 8,75+Qy%," You cannot save a"
  1606.   Text 8,85+Qy%," picture without a"
  1607.   Text 13,95+Qy%,"   puzzle word!"
  1608.   Argh%=1
  1609.   @Argh
  1610.   @Argh_dialog
  1611.   @Help_check_mouse
  1612.   Argh%=0
  1613. Return
  1614. '
  1615. Procedure File_not_found
  1616.   @Oopsy
  1617.   Text 10,75+Qy%,"There is no puzzle"
  1618.   Text 10,85+Qy%,"file on this disk!"
  1619.   Argh%=1
  1620.   @Argh
  1621.   @Argh_dialog
  1622.   @Help_check_mouse
  1623.   Argh%=0
  1624. Return
  1625. '
  1626. Procedure No_room_to_save
  1627.   @Oopsy
  1628.   Text 10,75+Qy%,"   There is not"
  1629.   Text 10,85+Qy%,"  enough room on"
  1630.   Text 7,95+Qy%," this disk to save"
  1631.   Text 10,105+Qy%,"   your puzzle!"
  1632.   Argh%=1
  1633.   @Argh
  1634.   @Argh_dialog
  1635.   @Help_check_mouse
  1636.   Argh%=0
  1637. Return
  1638. '
  1639. Procedure No_more_puzzles
  1640.   @Oopsy
  1641.   Text 10,75+Qy%,"   There are no"
  1642.   Text 10,85+Qy%," more puzzles on"
  1643.   Text 7,95+Qy%,"    this disk!"
  1644.   Argh%=1
  1645.   @Argh
  1646.   @Argh_dialog
  1647.   @Help_check_mouse
  1648.   Argh%=0
  1649. Return
  1650. '
  1651. Procedure Oopsy
  1652.   Deffill 15,2,8
  1653.   Pbox 6,50,160,193
  1654.   Qy%=0
  1655.   Ly%=141
  1656.   Df%=15
  1657.   Deftext 0,0,0,6
  1658.   Text 13,65+Qy%,"      Oops!"
  1659. Return
  1660. '
  1661. Procedure Help1
  1662.   Df%=11
  1663.   Ly%=169
  1664.   @Help_dialog
  1665.   Deftext 0,0,0,6
  1666.   Text 10,65,"Click PLAY to load"
  1667.   Text 10,75,"a puzzle.  Then "
  1668.   Text 10,85,"use the mouse to"
  1669.   Text 10,95,"choose letters and"
  1670.   Text 10,105,"try to guess the"
  1671.   Text 10,115,"puzzle word.  You"
  1672.   Text 10,125,"can score up to 9"
  1673.   Text 10,135,"points on each"
  1674.   Text 10,145,"puzzle."
  1675.   @Help_check_mouse
  1676.   @Help_dialog
  1677.   Deftext 0,0,0,6
  1678.   Text 10,65,"If you guess a"
  1679.   Text 10,75,"letter that is not"
  1680.   Text 10,85,"in the puzzle word,"
  1681.   Text 10,95,"another piece of"
  1682.   Text 10,105,"the puzzle is"
  1683.   Text 10,115,"displayed as a"
  1684.   Text 10,125,"hint and 1 point"
  1685.   Text 10,135,"is deducted from"
  1686.   Text 10,145,"the possible 9."
  1687.   @Help_check_mouse
  1688.   @Help_dialog
  1689.   Text 10,65,"Try to guess the"
  1690.   Text 10,75,"puzzle word before"
  1691.   Text 10,85,"the puzzle is"
  1692.   Text 10,95,"complete!"
  1693.   Text 10,125,"Click the mouse"
  1694.   Text 10,135,"on EXIT when you"
  1695.   Text 10,145,"are done playing."
  1696.   @Help_check_mouse
  1697.   Sput Current_screen$
  1698. Return
  1699. '
  1700. Procedure Help2
  1701.   Df%=11
  1702.   Ly%=169
  1703.   @Help_dialog
  1704.   Deftext 0,0,0,6
  1705.   Text 10,65,"Use the drawing"
  1706.   Text 10,75,"options to draw"
  1707.   Text 10,85,"a picture to use"
  1708.   Text 10,95,"as a word puzzle."
  1709.   Text 10,105,"When your picture"
  1710.   Text 10,115,"is ready, click"
  1711.   Text 10,125,"SAVE to type your"
  1712.   Text 10,135,"puzzle word and"
  1713.   Text 10,145,"save the puzzle."
  1714.   @Help_check_mouse
  1715.   @Help_dialog
  1716.   Text 10,65,"To draw, use the"
  1717.   Text 10,75,"mouse to select"
  1718.   Text 10,85,"a drawing color"
  1719.   Text 10,95,"and function:"
  1720.   Text 10,115,"FILL"
  1721.   Gy%=15
  1722.   Deftext 0,1,0,4
  1723.   Text 20,108+Gy%,"CLICK ON A SHAPE IN"
  1724.   Text 20,116+Gy%,"YOUR PICTURE TO FILL"
  1725.   Text 20,124+Gy%,"IT WITH CURRENT FILL"
  1726.   Text 20,132+Gy%,"PATTERN AND COLOR."
  1727.   @Help_check_mouse
  1728.   @Help_dialog
  1729.   Text 10,65,"CIRCLE"
  1730.   Gy%=-35
  1731.   Deftext 0,1,0,4
  1732.   Text 20,108+Gy%,"CLICK LEFT BUTTON TO"
  1733.   Text 20,116+Gy%,"PLACE CENTER OF CIRCLE."
  1734.   Text 20,124+Gy%,"CLICK LEFT BUTTON AGAIN"
  1735.   Text 20,132+Gy%,"TO FINISH DRAWING"
  1736.   Text 20,140+Gy%,"CIRCLE."
  1737.   Text 20,148+Gy%,"CLICK RIGHT BUTTON TO"
  1738.   Text 20,156+Gy%,"QUIT WITHOUT DRAWING"
  1739.   Text 20,164+Gy%,"CIRCLE."
  1740.   @Help_check_mouse
  1741.   @Help_dialog
  1742.   Text 10,65,"LINE"
  1743.   Gy%=-35
  1744.   Deftext 0,1,0,4
  1745.   Text 20,108+Gy%,"CLICK LEFT BUTTON TO"
  1746.   Text 20,116+Gy%,"BEGIN LINE."
  1747.   Text 20,124+Gy%,"CLICK LEFT BUTTON AGAIN"
  1748.   Text 20,132+Gy%,"AT END OF LINE TO"
  1749.   Text 20,140+Gy%,"FINISH DRAWING."
  1750.   Text 20,148+Gy%,"OR CLICK RIGHT BUTTON"
  1751.   Text 20,156+Gy%,"TO QUIT WITHOUT DRAWING"
  1752.   Text 20,164+Gy%,"LINE."
  1753.   @Help_check_mouse
  1754.   @Help_dialog
  1755.   Text 10,65,"FRAME"
  1756.   Gy%=-35
  1757.   Deftext 0,1,0,4
  1758.   Text 20,108+Gy%,"CLICK LEFT BUTTON TO"
  1759.   Text 20,116+Gy%,"PLACE UPPER LEFT-HAND"
  1760.   Text 20,124+Gy%,"CORNER OF FRAME."
  1761.   Text 20,132+Gy%,"CLICK LEFT BUTTON AGAIN"
  1762.   Text 20,140+Gy%,"TO SET LOWER RIGHT-HAND"
  1763.   Text 20,148+Gy%,"CORNER AND FINISH DRAW-"
  1764.   Text 20,156+Gy%,"ING FRAME."
  1765.   Text 20,164+Gy%,"OR CLICK RIGHT BUTTON"
  1766.   Text 20,172+Gy%,"TO QUIT WITHOUT DRAWING"
  1767.   Text 20,180+Gy%,"FRAME."
  1768.   @Help_check_mouse
  1769.   @Help_dialog
  1770.   Text 10,65,"DRAW"
  1771.   Gy%=-35
  1772.   Deftext 0,1,0,4
  1773.   Text 20,108+Gy%,"CLICK ON PICTURE TO"
  1774.   Text 20,116+Gy%,"DRAW DOT. <DRAG> MOUSE"
  1775.   Text 20,124+Gy%,"TO DRAW CONNECTED DOTS."
  1776.   Text 20,132+Gy%,"CLICK TWICE ON DRAW"
  1777.   Text 20,140+Gy%,"OPTION FOR LARGE DOT,"
  1778.   Text 20,148+Gy%,"ONCE FOR SMALL DOT."
  1779.   @Help_check_mouse
  1780.   @Help_dialog
  1781.   Text 10,65,"BLANK"
  1782.   Text 10,132-25,"FILL PATTERNS"
  1783.   Gy%=-35
  1784.   Deftext 0,1,0,4
  1785.   Text 20,108+Gy%,"CLICK BLANK OPTION TO"
  1786.   Text 20,116+Gy%,"COMPLETELY ERASE THE"
  1787.   Text 20,124+Gy%,"CURRENT PICTURE."
  1788.   Gy%=-25
  1789.   Text 20,140+Gy%,"CLICK FILL PATTERN BOX"
  1790.   Text 20,148+Gy%,"TO CHANGE THE CURRENT"
  1791.   Text 20,156+Gy%,"FILL PATTERN."
  1792.   @Help_check_mouse
  1793.   @Help_dialog
  1794.   Text 10,65,"MAGNIFY"
  1795.   Gy%=-35
  1796.   Deftext 0,1,0,4
  1797.   Text 20,108+Gy%,"CLICK THE MAGNIFICATION"
  1798.   Text 20,116+Gy%,"BOX. MOVE THE MOUSE"
  1799.   Text 20,124+Gy%,"TO FRAME PART OF YOUR"
  1800.   Text 20,132+Gy%,"PICTURE TO MAGNIFY."
  1801.   Text 20,140+Gy%,"CLICK LEFT BUTTON."
  1802.   Text 20,148+Gy%,"CLICK GRID IN THE"
  1803.   Text 20,156+Gy%,"MAGNIFICATION BOX TO"
  1804.   Text 20,164+Gy%,"MODIFY YOUR DRAWING."
  1805.   Text 20,172+Gy%,"CLICK THE RIGHT BUTTON"
  1806.   Text 20,180+Gy%,"TO STOP MAGNIFICATION."
  1807.   @Help_check_mouse
  1808.   @Help_dialog
  1809.   Text 10,65,"LOAD"
  1810.   Text 10,105,"UNDO"
  1811.   Gy%=-35
  1812.   Deftext 0,1,0,4
  1813.   Text 20,108+Gy%,"CLICK THE LOAD OPTION"
  1814.   Text 20,116+Gy%,"TO SEE THE PUZZLES ON"
  1815.   Text 20,124+Gy%,"YOUR DISK."
  1816.   Text 20,113,"WHILE DRAWING, IF YOU"
  1817.   Text 20,121,"WANT TO UNDO YOUR LAST"
  1818.   Text 20,129,"OPERATION, PRESS THE"
  1819.   Text 20,137,"UNDO KEY BEFORE CLICK-"
  1820.   Text 20,145,"THE MOUSE TO MAKE"
  1821.   Text 20,153,"ANOTHER SELECTION OR"
  1822.   Text 20,161,"TO DRAW."
  1823.   @Help_check_mouse
  1824.   Sput Current_screen$
  1825. Return
  1826. '
  1827. Procedure Argh_dialog
  1828.   Deffill 1,2,8
  1829.   Pbox 22,Ly%,145,Ly%+18
  1830.   Deffill 15,2,8
  1831.   Pbox 24,Ly%+3,142,Ly%+15
  1832.   Color 0
  1833.   Box 21,Ly%,145,Ly%+18
  1834.   Box 24,Ly%+3,142,Ly%+15
  1835. Return
  1836. '
  1837. Procedure Help_dialog
  1838.   Deffill Df%,2,8
  1839.   Pbox 6,50,160,193
  1840.   Deffill Df%,2,8
  1841.   Pbox 24,Ly%+3,142,Ly%+15
  1842.   Color 0
  1843.   Box 21,Ly%,145,Ly%+18
  1844.   Box 24,Ly%+3,142,Ly%+15
  1845.   Deffill 1,2,8
  1846.   Fill 22,Ly%+1
  1847. Return
  1848. '
  1849. Procedure Dialog_box
  1850.   Deffill Df%,2,8
  1851.   Fill 58,11
  1852.   Pbox 6,50,160,193
  1853. Return
  1854. '
  1855. Procedure Yes_or_no
  1856.   Deffill Df%,2,8
  1857.   Pbox 24,Ly%+3,78,Ly%+15
  1858.   Pbox 88,Ly%+3,142,Ly%+15
  1859.   Color 0
  1860.   Box 21,Ly%,81,Ly%+18
  1861.   Box 85,Ly%,145,Ly%+18
  1862.   Box 24,Ly%+3,78,Ly%+15
  1863.   Box 88,Ly%+3,142,Ly%+15
  1864.   Deffill 1,2,8
  1865.   Fill 22,Ly%+1
  1866.   Fill 86,Ly%+1
  1867.   Deftext 0,0,0,6
  1868.   Text 37,Ly%+12,"Yes."
  1869.   Text 104,Ly%+12,"No!"
  1870. Return
  1871. '
  1872. ' ***************************** KEYBOARD INPUT ************************
  1873. Procedure Determine_new_word
  1874.   ' The user types a new word to accompany the puzzle picture.  Typing
  1875.   ' <Return> signifies that the word is complete.  An opportunity is
  1876.   ' then presented to change the word if necessary.
  1877.   Start_determining:
  1878.   Df%=14
  1879.   @Dialog_box
  1880.   Qy%=25
  1881.   Deftext 0,0,0,6
  1882.   Text 15,65+Qy%,"  Type the word"
  1883.   Text 15,75+Qy%," for your puzzle"
  1884.   Text 15,85+Qy%,"picture and press"
  1885.   Text 15,95+Qy%,"    <Return>."
  1886.   @Get_word
  1887.   Df%=14
  1888.   @Dialog_box
  1889.   @Yes_or_no
  1890.   Deftext 0,0,0,6
  1891.   Text 10,90,"  Your word is:"
  1892.   Text 10,125,"  Is that right?"
  1893.   Deftext 0,0,0,13
  1894.   Text 36,110,Nw_word$
  1895.   Showm
  1896.   @Check_mouse
  1897.   If Yes%=0
  1898.     Goto Start_determining
  1899.   Endif
  1900. Return
  1901. '
  1902. Procedure Get_word
  1903.   Deftext 0,0,0,13
  1904.   Gx%=17
  1905.   For I%=1 To 12
  1906.     Text Gx%,144,"_ "
  1907.     Add Gx%,11
  1908.   Next I%
  1909.   Get 5,50,161,193,Rubber_box$
  1910.   A%=0
  1911.   Hidem
  1912.   For I%=1 To 12
  1913.     Lttr$(I%)=""
  1914.   Next I%
  1915.   Ltter_count%=1
  1916.   Nw_word$=""
  1917.   Gx%=16
  1918.   Repeat
  1919.     Backed_up:
  1920.     Repeat
  1921.     Until Inkey$=""
  1922.     A%=Inp(2)
  1923.     ' If the user presses the Backspace key, the last letter typed is erased.
  1924.     If A%=8
  1925.       Put 5,50,Rubber_box$
  1926.       Lttr$(Ltter_count%-1)=""
  1927.       Deffill Df%,2,8
  1928.       Pbox 15,125,160,140
  1929.       If Ltter_count%>1
  1930.         Dec Ltter_count%
  1931.         Sub Gx%,11
  1932.         Lx%=16
  1933.         For I%=1 To Ltter_count%
  1934.           Deftext 0,0,0,13
  1935.           Text Lx%,140,Lttr$(I%)
  1936.           Add Lx%,11
  1937.         Next I%
  1938.       Endif
  1939.       Goto Backed_up
  1940.     Endif
  1941.     ' The following clause renumbers the ASCII code of the letter typed
  1942.     ' if the user is typing in lower case.
  1943.     If A%>90
  1944.       A%=A%-32
  1945.     Endif
  1946.     If A%>63 And A%<91 And Ltter_count%<13
  1947.       Lttr$(Ltter_count%)=Chr$(A%)
  1948.       Deftext 0,0,0,13
  1949.       Text Gx%,140,Lttr$(Ltter_count%)
  1950.       Inc Ltter_count%
  1951.       Add Gx%,11
  1952.     Endif
  1953.     Pause 5
  1954.   Until A%=13
  1955.   Dec Ltter_count%
  1956.   For I%=1 To Ltter_count%
  1957.     Nw_word$=Nw_word$+Lttr$(I%)
  1958.   Next I%
  1959. Return
  1960. '
  1961. Procedure Get_word2
  1962.   Deftext 0,0,0,13
  1963.   Gx%=17+22
  1964.   For I%=1 To 8
  1965.     Text Gx%,144,"_ "
  1966.     Add Gx%,11
  1967.   Next I%
  1968.   Get 5,50,161,193,Rubber_box$
  1969.   A%=0
  1970.   Hidem
  1971.   For I%=1 To 8
  1972.     Lttr$(I%)=""
  1973.   Next I%
  1974.   Ltter_count%=1
  1975.   Nw_word$=""
  1976.   Gx%=16+22
  1977.   Repeat
  1978.     Backed_up2:
  1979.     Repeat
  1980.     Until Inkey$=""
  1981.     A%=Inp(2)
  1982.     ' If the user presses the Backspace key, the last letter typed is erased.
  1983.     If A%=8
  1984.       Put 5,50,Rubber_box$
  1985.       Lttr$(Ltter_count%-1)=""
  1986.       Deffill Df%,2,8
  1987.       Pbox 15,125,160,140
  1988.       If Ltter_count%>1
  1989.         Dec Ltter_count%
  1990.         Sub Gx%,11
  1991.         Lx%=16+22
  1992.         For I%=1 To Ltter_count%
  1993.           Deftext 0,0,0,13
  1994.           Text Lx%,140,Lttr$(I%)
  1995.           Add Lx%,11
  1996.         Next I%
  1997.       Endif
  1998.       Goto Backed_up2
  1999.     Endif
  2000.     ' The following clause renumbers the ASCII code of the letter typed
  2001.     ' if the user is typing in lower case.
  2002.     If A%>90
  2003.       A%=A%-32
  2004.     Endif
  2005.     If A%>63 And A%<91 And Ltter_count%<9
  2006.       Lttr$(Ltter_count%)=Chr$(A%)
  2007.       Deftext 0,0,0,13
  2008.       Text Gx%,140,Lttr$(Ltter_count%)
  2009.       Inc Ltter_count%
  2010.       Add Gx%,11
  2011.     Endif
  2012.     Pause 5
  2013.   Until A%=13
  2014.   Dec Ltter_count%
  2015.   For I%=1 To Ltter_count%
  2016.     Nw_word$=Nw_word$+Lttr$(I%)
  2017.   Next I%
  2018. Return
  2019. '
  2020. ' ************************ SAVE/LOAD A WORD FILE **********************
  2021. Procedure Save_it
  2022.   Here_goes%=1
  2023.   @Determine_new_word
  2024.   Here_goes%=0
  2025.   Ly%=145
  2026.   Qy%=25
  2027.   Df%=14
  2028.   @Dialog_box
  2029.   @Yes_or_no
  2030.   Deftext 0,0,0,6
  2031.   Text 10,65+Qy%," Are you ready to"
  2032.   Text 7,75+Qy%," save this picture"
  2033.   Text 10,85+Qy%," to use as a word"
  2034.   Text 10,95+Qy%,"      puzzle?"
  2035.   @Check_mouse
  2036.   If Yes%=0
  2037.     Goto No_save
  2038.   Endif
  2039.   If Nw_word$=""
  2040.     @No_new_word
  2041.     Goto No_save
  2042.   Endif
  2043.   Sput Current_screen$
  2044.   Restore Drw_box_puzzle_data
  2045.   Puz$=""
  2046.   Sizetotal%=0
  2047.   For I%=1 To 9
  2048.     Read Lx%,Ly%,Rx%,Ry%
  2049.     Get Lx%,Ly%,Rx%,Ry%,Puzzle$(I%)
  2050.     Puz$=Puz$+Puzzle$(I%)
  2051.     Sizepuz%(I%)=Len(Puzzle$(I%))
  2052.     Sizetotal%=Sizetotal%+Sizepuz%(I%)
  2053.   Next I%
  2054.   ' * Make sure there is enough room on the disk to accommodate new record:
  2055.   If Dfree(Dev%+1)>14082
  2056.     Open "R",#1,File$,12+Sizetotal%
  2057.     Field #1,12 As Tempnw_word$,Sizetotal% As Temppuz$
  2058.     Recno%=(Lof(#1)/(Sizetotal%+12))+1
  2059.     Lset Tempnw_word$=Nw_word$
  2060.     Lset Temppuz$=Puz$
  2061.     Put #1,Recno%
  2062.   Else
  2063.     @No_room_to_save
  2064.   Endif
  2065.   Close #1
  2066.   No_save:
  2067. Return
  2068. '
  2069. Procedure Load_it
  2070.   If Exist(File$)
  2071.     Sizepuz%(0)=0
  2072.     Tempnw_word$=""
  2073.     Open "R",#1,File$,Sizetotal%+12
  2074.     Field #1,12 As Tempnw_word$,Sizetotal% As Puz$
  2075.     Rr%=Lof(#1)/(Sizetotal%+12)
  2076.     If Play_game%=1
  2077.       No_more%=0
  2078.       Try_again:
  2079.       For I%=1 To Rr%
  2080.         Exit If Record_already_chosen%(I%)=0
  2081.         If I%=Rr% And Record_already_chosen%(Rr%)=1
  2082.           @No_more_puzzles
  2083.           No_more%=1
  2084.         Endif
  2085.         Exit If No_more%=1
  2086.       Next I%
  2087.       If No_more%=1
  2088.         Lsuccess%=0
  2089.         Close #1
  2090.         @Clear_records
  2091.         Goto No_load
  2092.       Endif
  2093.       Recno%=Random(Rr%)+1
  2094.       ' * Make sure this record isn't a repeat:
  2095.       If Record_already_chosen%(Recno%)=1
  2096.         Goto Try_again
  2097.       Endif
  2098.       Record_already_chosen%(Recno%)=1
  2099.     Else
  2100.       If File_number%>Rr%
  2101.         File_number%=1
  2102.       Endif
  2103.       File_number$="PUZZLE #"+Str$(File_number%)
  2104.       Deftext 10,0,0,6
  2105.       Text 57,34,File_number$
  2106.       Recno%=File_number%
  2107.     Endif
  2108.     Get #1,Recno%
  2109.     Close #1
  2110.     Strposit%=1
  2111.     For I%=1 To 9
  2112.       Puzzle$(I%)=Mid$(Puz$,Strposit%,Sizepuz%(I%))
  2113.       Strposit%=Strposit%+Sizepuz%(I%)
  2114.     Next I%
  2115.     ' The following loop establishes Real_word$ as the part of Tempnw_word$
  2116.     ' that consists of letters rather than spaces.
  2117.     Real_word$=""
  2118.     For I%=1 To 12
  2119.       If Mid$(Tempnw_word$,I%,1)<>" "
  2120.         Real_word$=Real_word$+Mid$(Tempnw_word$,I%,1)
  2121.       Endif
  2122.     Next I%
  2123.     Lsuccess%=1
  2124.     If Play_game%<>1
  2125.       Deffill 0,2,8
  2126.       Pbox 57,19,160,40
  2127.       Deftext 10,0,0,6
  2128.       Text 57,34,Real_word$
  2129.     Endif
  2130.   Else
  2131.     @File_not_found
  2132.     Lsuccess%=0
  2133.   Endif
  2134.   No_load:
  2135. Return
  2136. '
  2137. Procedure Fill_puzzle_array
  2138.   Puz$=""
  2139.   Restore Drw_box_puzzle_data
  2140.   For I%=1 To 9
  2141.     Read Lx%,Ly%,Rx%,Ry%
  2142.     Get Lx%,Ly%,Rx%,Ry%,Puzzle$(I%)
  2143.     Puz$=Puz$+Puzzle$(I%)
  2144.     Sizepuz%(I%)=Len(Puzzle$(I%))
  2145.     Sizetotal%=Sizetotal%+Sizepuz%(I%)
  2146.   Next I%
  2147. Return
  2148. '
  2149. ' **************************** CLEARANCE ***************************
  2150. Procedure Clear_instructions
  2151.   Deffill 0,2,8
  2152.   Pbox 0,19,319,43
  2153. Return
  2154. '
  2155. Procedure Clear_junk
  2156.   @Clear_instructions
  2157.   Graphmode 1
  2158.   Deffill 0,2,8
  2159.   Fill 58,1
  2160.   Deffill 0,2,8
  2161.   Pbox 171,105,319,159
  2162.   Put 177,44,Alphabet_grid$
  2163.   Deffill 1,2,8
  2164.   Pbox 6,50,160,193
  2165.   Graphmode 2
  2166. Return
  2167. '
  2168. Procedure Clear_scores
  2169.   Deffill 0,2,8
  2170.   Pbox 295,150,319,199
  2171. Return
  2172. '
  2173. Procedure Clear_scores1
  2174.   Deffill 0,2,8
  2175.   Pbox 275,180,319,199
  2176. Return
  2177. '
  2178. Procedure Clear_records
  2179.   For I%=1 To 200
  2180.     Record_already_chosen%(I%)=0
  2181.   Next I%
  2182. Return
  2183. '
  2184. Procedure Clear_draw_options
  2185.   Put 171,88,Clear_draw_options$
  2186.   Deffill 0,2,8
  2187.   Fill 172,67
  2188. Return
  2189. '
  2190. ' ******************************* SOUNDS *********************************
  2191. Procedure Select_sound
  2192.   Sound 1,15,6,3,2
  2193.   Sound 1,15,6,4,2
  2194.   Sound 1,15,8,4,6
  2195.   Sound 1,0,0,0,0
  2196. Return
  2197. '
  2198. Procedure Other_sound
  2199.   Sound 1,15,6,4,2
  2200.   Sound 1,15,1,4,5
  2201.   Sound 1,0,0,0,0
  2202. Return
  2203. '
  2204. Procedure Other_sound2
  2205.   Sound 1,15,6,3,2
  2206.   Sound 1,15,1,2,5
  2207.   Sound 1,0,0,0,0
  2208. Return
  2209. '
  2210. Procedure Finale_sound
  2211.   Hidem
  2212.   Restore Finale_data
  2213.   Read N%
  2214.   For I%=1 To N%
  2215.     Read Nt%,Oct%,Dur%
  2216.     Sound 1,15,Nt%,Oct%,Dur%
  2217.     Sound 1,0,0,0,0
  2218.     Pause 5
  2219.   Next I%
  2220. Return
  2221. '
  2222. Procedure Argh
  2223.   Sound 1,15,7,3,200
  2224.   Nt%=6
  2225.   Deftext 2,4,0,13
  2226.   For I%=1 To 5
  2227.     Text 13+15*I%,107+16*I%,"ARGH!"
  2228.     Sound 1,15,Nt%,3,8
  2229.     Dec Nt%
  2230.   Next I%
  2231.   Sound 1,15,1,2,32
  2232.   Sound 1,0,0,0,0
  2233. Return
  2234. '
  2235. Procedure Congrats_sound
  2236.   Hidem
  2237.   Restore Congrats_data
  2238.   Length%=25000
  2239.   For I%=1 To 4
  2240.     Read Dur1%,Dur2%,Dur3%,Nt1%,Oct1%,Nt2%,Oct2%,Nt3%,Oct3%
  2241.     Sound 1,0,Nt1%,Oct1%,0
  2242.     Sound 2,0,Nt2%,Oct2%,0
  2243.     Sound 3,0,Nt3%,Oct3%,0
  2244.     Wave 7,7,0,Length%,Dur1%
  2245.     Wave 0,0
  2246.     Exit If Dur2%=0
  2247.     Wave 7,7,0,Length%,Dur2%
  2248.     Wave 0,0
  2249.     Wave 7,7,0,Length%,Dur3%
  2250.   Next I%
  2251.   Wave 0,0
  2252. Return
  2253. '
  2254. Procedure Erase_sound
  2255.   For Oct%=6 Downto 3
  2256.     For Nt%=12 Downto 1
  2257.       Sound 1,15,Nt%,Oct%,3
  2258.     Next Nt%
  2259.   Next Oct%
  2260.   Sound 1,0,0,0,0
  2261. Return
  2262. '
  2263. Procedure Dud_sound
  2264.   For Nt%=12 Downto 1
  2265.     For Oct%=4 Downto 3
  2266.       Sound 1,15,Nt%,Oct%,5
  2267.       Sound 1,0,0,0,0
  2268.     Next Oct%
  2269.   Next Nt%
  2270.   Sound 1,15,12,2,30
  2271.   Sound 1,0,0,0,0
  2272. Return
  2273. '
  2274. Procedure Alert_sound
  2275.   Sound 1,15,10,3,2
  2276.   Sound 1,0,0,0,0
  2277. Return
  2278. '
  2279. ' ******************************* DATA ********************************
  2280. Finale_data:
  2281. ' Formula: Nt%,Oct%,Dur%
  2282. Data 7
  2283. Data 6,4,16
  2284. Data 1,4,8
  2285. Data 1,4,8
  2286. Data 3,4,16
  2287. Data 1,4,32
  2288. Data 5,4,16
  2289. Data 6,4,64
  2290. '
  2291. Congrats_data:
  2292. ' Formula: Dur1%,Dur2%,Dur3%Nt1%,Oct1%,Nt2%,Oct2%,Nt3%,Oct3%
  2293. Data 32,16,16
  2294. Data 5,4,8,4,1,5
  2295. Data 32,16,16
  2296. Data 8,4,1,5,5,5
  2297. Data 32,16,16
  2298. Data 1,5,5,5,8,5
  2299. Data 64,0,0
  2300. Data 5,5,8,5,1,6
  2301. '
  2302. Alphabet_data:
  2303. ' Formula: Lx%,Ly%,A$,N%
  2304. Data 177,44,"A",1
  2305. Data 192,44,"B",2
  2306. Data 207,44,"C",3
  2307. Data 222,44,"D",4
  2308. Data 237,44,"E",5
  2309. Data 252,44,"F",6
  2310. Data 267,44,"G",7
  2311. Data 282,44,"H",8
  2312. Data 297,44,"I",9
  2313. Data 177,63,"J",10
  2314. Data 192,63,"K",11
  2315. Data 207,63,"L",12
  2316. Data 222,63,"M",13
  2317. Data 237,63,"N",14
  2318. Data 252,63,"O",15
  2319. Data 267,63,"P",16
  2320. Data 282,63,"Q",17
  2321. Data 297,63,"R",18
  2322. Data 177,82,"S",19
  2323. Data 192,82,"T",20
  2324. Data 207,82,"U",21
  2325. Data 222,82,"V",22
  2326. Data 237,82,"W",23
  2327. Data 252,82,"X",24
  2328. Data 267,82,"Y",25
  2329. Data 282,82,"Z",26
  2330. '
  2331. Clor_choice_data1:
  2332. ' Formula: Col% (color number),Lx% (upper left-hand x-position of option)
  2333. Data 2,171
  2334. Data 10,196
  2335. Data 11,221
  2336. Data 14,246
  2337. Data 12,271
  2338. Data 4,296
  2339. '
  2340. Clor_choice_data2:
  2341. ' Formula: Col% (color number),Lx% (upper left-hand x-position of option)
  2342. Data 3,171
  2343. Data 6,196
  2344. Data 7,221
  2345. Data 5,246
  2346. Data 13,271
  2347. Data 15,296
  2348. '
  2349. Shell_data:
  2350. ' Formula: Lx%,Ly%,Rx%,Ry%,C%,I$,Tx%
  2351. Data 0,85,142,137,3,"Play the Game",18
  2352. Data 177,85,319,137,12,"Make a Puzzle",195
  2353. Data 83,147,225,199,2,"E X I T",125
  2354. '
  2355. All_screens_data:
  2356. ' Formula for first four items: C%,C$,Cx%,Lx%,Ly%,Rx%,Ry%
  2357. Data 2,"EXIT",11,0,0,52,18
  2358. Data 3,"PLAY",67,57,0,109,18
  2359. Data 11,"HELP",125,114,0,166,18
  2360. Data 0,44,166,199
  2361. '
  2362. Creation_screen_data:
  2363. ' Formula: C%,Lx%
  2364. Data 2,171
  2365. Data 10,196
  2366. Data 11,221
  2367. Data 14,246
  2368. Data 12,271
  2369. Data 4,296
  2370. Data 3,171
  2371. Data 6,196
  2372. Data 7,221
  2373. Data 5,246
  2374. Data 13,271
  2375. Data 15,296
  2376. Data 0,183
  2377. Data 1,208
  2378. ' Formula: Cx%,C$
  2379. Data 190,"FILL",182,"CIRCLE",190,"LINE",261,"FRAME",261,"DRAW"
  2380. '
  2381. Drw_box_puzzle_data:
  2382. ' Formula:  Lx%,Ly%,Rx%,Ry%
  2383. Data 6,50,57,98
  2384. Data 57,50,109,98
  2385. Data 109,50,160,98
  2386. '
  2387. Data 6,98,57,145
  2388. Data 57,98,109,145
  2389. Data 109,98,160,145
  2390. '
  2391. Data 6,145,57,193
  2392. Data 57,145,109,193
  2393. Data 109,145,160,193
  2394. '
  2395.